<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    const judgeTime = (time) => {
        //let t = time.replace("/-/g", "/");//时间转换
        //时间
        let date1 = new Date(time);
        //现在时间
        let date2 = new Date();
        //判断时间是否过期
        return date1 < date2
    }

    console.log(judgeTime("2023-03-31"))

    const arr = [[
        {label: 'aaa', value: 0},
        {label: 'bbb', value: 1},
        {label: 'ccc', value: 2}
    ]]
    const str = "bbb"
    console.log(arr[0].filter((item, index) => item.label == str))

    const brr = [
        {label: 'aaa', value: 0},
        {label: 'bbb', value: 1},
        {label: 'ccc', value: 2},
        {label: 'bbb', value: 1}
    ]
</script>
</body>
</html>